package cn.llk.mall.entity;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.time.LocalDate;
import java.io.Serializable;
import java.util.Date;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author llk
 * @since 2021-04-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("goods")
@ApiModel(value="GoodsEntity对象", description="")
public class GoodsEntity extends Model<GoodsEntity> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "商品主键")
    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;

    @ApiModelProperty(value = "商品名称")
    @TableField("goods_name")
    private String goodsName;

    @ApiModelProperty(value = "商品价格")
    @TableField("goods_price")
    private BigDecimal goodsPrice;

    @ApiModelProperty(value = "商品类别")
    @TableField("goods_type")
    private String goodsType;

    @ApiModelProperty(value = "商品图片")
    @TableField("goods_image")
    private String goodsImage;

    @ApiModelProperty(value = "商品库存")
    @TableField("goods_stock")
    private Integer goodsStock;

    @ApiModelProperty(value = "商品销量")
    @TableField("goods_sale_count")
    private Integer goodsSaleCount;

    @TableField(value = "create_date",fill = FieldFill.INSERT)
    private Date createDate;

    @TableField(value = "update_date",fill= FieldFill.INSERT_UPDATE)
    private Date updateDate;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
